<?php

namespace CMBUBank\UBank\Response\Account;

use CMBUBank\UBank\Response\UBankBaseResponse;

class AccountTradeListQueryResponse extends UBankBaseResponse
{
    protected $responseCode = ['ntqactrsz2'];

    protected $pageCode = 'ntrbptrsz1';
    /**
     * @return array
     */
    public function getTradeList(): array
    {
        return $this->bussList;
    }

    public function pageFormat()
    {
        $hasNext = $this->pageInfo[0]['cotflg'] ?? false;

        if ($hasNext == 'Y') {
            $this->nextPage = (string)($this->pageInfo[0]['trsseq'] + 1 ?? 0);
        }
    }
}